﻿using FCDB.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FCDB.Repository
{
    public class MyTeamRepository : LogicBase, ILogic
    {
        public IList<MyTeam> GetMyTeam(System.Guid UseID,int skip, int take, out int total)
        {
            var quere = from item in DBHelper.MyTeam
                        where item.MyUserID == UseID
                        select item;
            total = quere.Count();
            return quere.OrderByDescending(t => t.ID).Skip(skip).Take(take).ToList();
        }
        public IList<MyTeam> GetMyTeam(System.Guid UseID)
        {
            var quere = from item in DBHelper.MyTeam
                        where item.MyUserID == UseID
                        select item;
            return quere.ToList();
        }
        public IList<MyTeam> GetAllMyTeam(System.Guid UseID, int skip, int take, out int total)
        {
            var quere = from item in DBHelper.MyTeam
                        where item.MyUserID == UseID
                        select item;
            total = quere.Count();
            return quere.OrderByDescending(t => t.ID).Skip(skip).Take(take).ToList();
        }
        public IList<MyTeam> GetAllMyTeam(System.Guid UseID)
        {
            var quere = from item in DBHelper.MyTeam
                        where item.MyUserID == UseID
                        select item;
            return quere.ToList();
        }
    }
}
